# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=libndp
pkgver=1.9
pkgrel=1
pkgdesc="Library for IPv6 Neighbor Discovery Protocol"
url="http://libndp.org"
arch="all"
license="LGPL-2.1-or-later"
makedepends="autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jpirko/libndp/archive/v$pkgver.tar.gz
	0001-remove-bash-dependency.patch
	0001-Patch-libndp.c.patch
	"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static \
		--libexecdir=/usr/lib
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
f1494e8413c022ed8ac93022c3fc3155622f1e7fd5a1d9a1a91986852565a5e620308fe525e1ba0fa549e677384d00f49efbad35a6b53765e52ec7cee13d1fd5  libndp-1.9.tar.gz
e0cdeb09b757c8b8ed199ae9178dedcbb64769fee775be73f6c704fcb7fd749a91fda6c85b11f6ffcc010cef05a5ecc1d5b334374fa5056ab1cfae170e8afd6a  0001-remove-bash-dependency.patch
d3d860139c3e2c7ea286106966ff418c8b974b2e27bcdc416dbec2f6a1d16e5accff18ad6c75edf1ddec38d64c683837096b69b470669bfcb7864884c633c39c  0001-Patch-libndp.c.patch
"
